package com.xmim.core.entity;


import lombok.Builder;

import java.io.Serializable;

/**
 * 控制端/服务器/傀儡端 三者之间传输的对象
 */
@Builder
public class Message<T> implements Serializable {
    /*  会话ID  */
    protected String sessionId;
    /*  消息ID   */
    protected String messageId;
    /*  消息类型   */
    protected Integer messageType;
    /*  请求体   */
    protected T body;

    public Message() {
    }

    public Message(String sessionId, String messageId, Integer messageType, T body) {
        this.sessionId = sessionId;
        this.messageId = messageId;
        this.messageType = messageType;
        this.body = body;
    }

    public String getMessageId() {
        return messageId;
    }

    public String getSessionId() {
        return sessionId;
    }

    public Integer getType() {
        return messageType;
    }

    public T getBody() {
        return body;
    }


}
